home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Shadow.pxl < prev    next >
Text File  |  2000-12-23  |  3KB  |  125 lines

  1. {    Filename    :     user1_12.pxl
  2.      Purpose    :    Skeleton file for PiXCL applications
  3.     Date    :    13feb 98
  4.     Author:        S.Dibbs, VYSOR Integration Inc
  5. History:
  6.  
  7.     Version    :  1.0    RELEASE
  8.     Update    :  
  9.     Date    :  
  10.  
  11. --------------------------------------------------------------------------}
  12. Initialize: {only one instance allowed}
  13.     UseCoordinates(PIXEL)
  14.     Title$ = "Shadow Text commands for PiXCL 4.40"                                  
  15.     WinExist(Title$,Res)
  16.     If Res = 0 Then Goto One_Instance
  17.     Beep
  18.     WinSetActive(Title$,Res)
  19.     WinShow(Title$,RESTORE,Res)
  20.     End
  21. One_Instance:
  22.     UseCaption(Title$) {change the title}
  23.     WinLocate(Title$,224,118,758,448,Res)                
  24.     UseBackground(TRANSPARENT,255,255,255)     
  25.     WinShow(Title$,NOTOPMOST,Res) 
  26.     DrawBackGround
  27.     DirGet(SourceDir$) {used later for library function calls}
  28.  
  29.     {DragAcceptFile(ENABLE,AcceptFile)}
  30.     {AutoProgressBar(DISABLE)}
  31.  
  32.     InfoMenu(REMOVE)
  33.     WaitInput(100)
  34.     SetMenu("&File",IGNORE,
  35.         "&New",CreatingFile,
  36.         "&Open",OpeningFile,
  37.         "&Save",SavingFile,
  38.         SEPARATOR,
  39.         "E&xit!",Terminate,
  40.         ENDPOPUP,
  41.         "&Information",IGNORE,
  42.         "&Concept",Concept,
  43.         "&Help",ShowAppHelp,
  44.         SEPARATOR,
  45.         "About",About,
  46.         ENDPOPUP)
  47.  
  48.     {Toolbar(    RAISED, PXL_SMALL,
  49.         NULL, NULL, SEPARATOR, "", Wait_for_Input,
  50.         PXL_NEW, ENABLED, STD, "FileNew", CreatingFile,
  51.         PXL_OPEN, ENABLED, STD, "FileOpen", OpeningFile,
  52.         PXL_SAVE, ENABLED, STD, "FileSave", SavingFile,
  53.         NULL, NULL, SEPARATOR, "", Wait_for_Input,
  54.         PXL_SHOHLP, ENABLED, STD,"Show Help",ShowAppHelp)}
  55.         
  56.     StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
  57.     DrawStatusWinText(0,"Ready") 
  58.  
  59.     
  60. Wait_for_Input:
  61.     WaitInput()
  62.  
  63. Terminate:
  64.     End
  65.  
  66.  
  67. Concept:
  68.     MessageBox(OK,1,INFORMATION,
  69. "This is a skeleton of a PiXCL application.  You could briefly
  70. describe your application's function here, or provide some
  71. basic help information.",
  72.     "PiXCL Skeleton Concept",Res)
  73.  
  74.     Goto Wait_for_Input
  75.  
  76. ShowAppHelp:
  77.     {An application Help file usually has the same name as the application.}
  78.     Winhelp("shadow.hlp",CONTENTS,"")
  79.  
  80.     Goto Wait_for_Input
  81.  
  82. About:
  83.     AboutUser("Application Title goes here",
  84.       "Two lines of text goes here e.g. Application function.",
  85.     "Four Lines of additional information goes here, perhaps contact information and Web addresses")
  86.  
  87.     Goto Wait_for_Input
  88.  
  89. CreatingFile:
  90.     {TODO: add file handling here}
  91.     DrawBackground
  92.     UseFont("Arial",11,23,NOBOLD,NOITALIC,NOUNDERLINE,255,0,0)
  93.     DrawText(10,10,"This is a test of DrawText")
  94.  
  95.     DrawShadowText(10,40,"This is a test of DrawText",0,0,0,-1)
  96.  
  97.     DrawShadowTextExt(10,70,400,270,"This is more text in a RECT region, and should wrap around.",LEFT,0,0,0,1)
  98.     Goto Wait_for_Input
  99.  
  100. OpeningFile:
  101.     {TODO: add file handling here}
  102.     DrawBackground
  103.     AngleX10 = 0
  104.     Spacing = 4
  105.     For i=0 To 360 By 10
  106.         SetFontEscapement(AngleX10)
  107.         SetTextSpacing(Spacing)
  108.         UseFont("Arial",7,15,BOLD,ITALIC,NOUNDERLINE,255,0,0)
  109.         DrawShadowText(250,250,"         This is a test of DrawText",0,0,0,1)
  110.         AngleX10 = i * 10 
  111.         Negate(AngleX10)
  112.     Next
  113.  
  114.     Goto Wait_for_Input
  115.  
  116. SavingFile:
  117.     {TODO: add file handling here}
  118.     Goto Wait_for_Input
  119.  
  120. AcceptFile:
  121.     GetDragList(FileList$)
  122.     {TODO: add file list handling here, or delete this whole label handler}
  123.     Goto Wait_for_Input
  124.     
  125.